package com.example.demo.mapper;

import com.example.demo.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

//用户操作
@Mapper
public interface UserMapper {
    @Insert("insert into l1(uid,names,password,times)values(#{uid},#{names},#{password},#{times});")
    public int insertUser(User user);
    @Select("select uid,names,password,times from l1 where names=#{names};")
    public List<User> getAll(String names);
    @Delete(" delete from l1 where uid=#{uid};")
    public int delete(int uid);
    @Update("update l1 set names=#{names} where uid=#{uid};")
    public int update(int uid,String names);
}
